package co.yixiang.yshop.module.order.controller.app.order.vo;


import co.yixiang.yshop.module.order.service.storeorder.dto.StatusDTO;
import co.yixiang.yshop.module.product.controller.app.cart.vo.AppStoreCartQueryVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static co.yixiang.yshop.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * <p>
 * 订单表 查询结果对象
 * </p>
 *
 * @author hupeng
 * @date 2023-6-19
 */
@Data
@Schema(description = "用户 APP - 订单表查询参数")
public class AppStoreOrderQueryVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "订单ID")
    private Long id;

    @Schema(description = "订单号")
    private String orderId;

    private String extendOrderId;

    @Schema(description = "用户id")
    private Long uid;

    @Schema(description = "用户姓名")
    private String realName;

    @Schema(description = "用户电话")
    private String userPhone;

    @Schema(description = "详细地址")
    private String userAddress;

    @Schema(description = "购物车id")
    private String cartId;

    @Schema(description = "购物车信息")
    private List<AppStoreCartQueryVo> cartInfo;

    @Schema(description = "订单信息合集")
    private StatusDTO _status;

    @Schema(description = "运费金额")
    private BigDecimal freightPrice;

    @Schema(description = "订单商品总数")
    private Integer totalNum;

    @Schema(description = "订单总价")
    private BigDecimal totalPrice;

    @Schema(description = "邮费")
    private BigDecimal totalPostage;

    @Schema(description = "实际支付金额")
    private BigDecimal payPrice;

    @Schema(description = "实际支付积分")
    private BigDecimal payIntegral;

    @Schema(description = "支付邮费")
    private BigDecimal payPostage;

    @Schema(description = "抵扣金额")
    private BigDecimal deductionPrice;

    @Schema(description = "优惠券id")
    private Long couponId;

    @Schema(description = "优惠券金额")
    private BigDecimal couponPrice;

    @Schema(description = "支付状态")
    private Integer paid;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = "GMT+8")
    @Schema(description = "支付时间")
    private LocalDateTime payTime;

    @Schema(description = "支付方式")
    private String payType;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "订单状态（-1 : 申请退款 -2 : 退货成功 0：待发货；1：待收货；2：已收货；3：待评价；-1：已退款")
    private Integer status;

    @Schema(description = "0 未退款 1 申请中 2 已退款")
    private Integer refundStatus;

    @Schema(description = "退款图片")
    private String refundReasonWapImg;

    @Schema(description = "退款用户说明")
    private String refundReasonWapExplain;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = "GMT+8")
    @Schema(description = "退款时间")
    private LocalDateTime refundReasonTime;

    @Schema(description = "前台退款原因")
    private String refundReasonWap;

    @Schema(description = "不退款的理由")
    private String refundReason;

    @Schema(description = "退款金额")
    private BigDecimal refundPrice;

    @Schema(description = "快递名称/送货人姓名")
    private String deliveryName;

    @Schema(description = "快递公司编号")
    private String deliverySn;

    @Schema(description = "发货类型")
    private String deliveryType;

    @Schema(description = "快递单号/手机号")
    private String deliveryId;

    @Schema(description = "消费赚取积分")
    private BigDecimal gainIntegral;

    @Schema(description = "使用积分")
    private BigDecimal useIntegral;

    @Schema(description = "给用户退了多少积分")
    private BigDecimal backIntegral;

    @Schema(description = "备注")
    private String mark;

    @Schema(description = "确认订单返回的key")
    private String unique;

    @Schema(description = "管理员备注")
    private String remark;

    @Schema(description = "拼团产品id0一般产品")
    private Long combinationId;

    @Schema(description = "拼团id 0没有拼团")
    private Long pinkId;

    @Schema(description = "成本价")
    private BigDecimal cost;

    @Schema(description = "秒杀产品ID")
    private Long seckillId;


    @Schema(description = "配送方式 1=快递 ，2=门店自提")
    private Integer shippingType;

    @Schema(description = "发货时间")
    private LocalDateTime deliveryTime;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "支付信息")
    private String payInfo;

    @Schema(description = "核销状态")
    private Integer writeOffStatus;

    @Schema(description = "核销时间")
    private LocalDateTime writeOffDate;

    @Schema(description = "核销码")
    private String writeOffCode;

    @Schema(description = "门店id")
    private Long storeId;

    @Schema(description = "门店名称")
    private String storeName;

    @Schema(description = "门店地址")
    private String shopAddress;

    @Schema(description = "营销活动明细id")
    private Long campaignDetailId;

    @Schema(description = "活动类型")
    private Integer campaignType;

    @Schema(description = "拼团id")
    private Long teamworkId;

    @Schema(description = "总优惠金额 会员,优惠券,积分抵扣")
    private BigDecimal totalCouponPrice;

    @Schema(description = "代付用户的id")
    private Long helpUid;

    @Schema(description = "完成订的时间（确认收货）")
    private LocalDateTime completeTime;

    @Schema(description = "订单创建多久被取消（分钟）")
    private Integer cancelTime;

    @Schema(description = "是否评价 大于0表示已经评价", required = true)
    private Long isReply;
}
